<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 
            1.变量或者表达式

            2.对象形式
            {属性:变量或者表达式}

            3.数组形式
            myStyle1: {
                color: 'red'
            }
         -->
        <!-- <span :style="myStyle">动态绑定样式1</span> -->
        <!-- <span :style="{color:mycolor}">动态绑定样式2</span> -->
        <span :style="[myStyle1, myStyle2]">动态绑定样式2</span>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.14/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                // myStyle: "color:red"
                // mycolor: 'red'
                myStyle1: {
                    color: 'red'
                },
                myStyle2: {
                    fontSize: "30px"
                }
            }
        })
    </script>
</body>
</html>